package cn.promonkey.api.relation.entity;
import java.util.Date;
import java.util.List;

import org.springframework.format.annotation.DateTimeFormat;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import cn.promonkey.api.menu.entity.Menu;
import cn.promonkey.core.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/** @author ninelock-ai */
@Data
@TableName("relation")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Relation { 
  /** 企业ID */
  @TableField(value = "business_id")
  private Long businessId;
  /** 系统id */
  @TableField(value = "system_id")
  private Long systemId;
  /** 权限组ID */
  @TableField(value = "group_id")
  private Long groupId;
  /** 用户ID */
  @TableField(value = "user_id")
  private Long userId;
  @TableField(exist = false)
  private List<Long> checkList;
  /** 创建人 */
  @TableField(fill = FieldFill.INSERT,value = "create_id")
  private Long createId;
  /** 创建时间 */
  @TableField(fill = FieldFill.INSERT,value = "create_time")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date createTime;
  /** 更新人 */
  @TableField(fill = FieldFill.INSERT_UPDATE,value = "update_id")
  private Long updateId;
  /** 更新时间 */
  @TableField(fill = FieldFill.INSERT_UPDATE,value = "update_time")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date updateTime;
  /** 删除状态(0-正常,1-已删除) */
  @TableField(fill = FieldFill.INSERT,value = "del_flag")
  private Integer delFlag;
}
